package com.anhry.app.safety.util;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class PopupAuthenticator extends Authenticator {
	private String uname;//用户名

	private String password;//密码

	//属性方法
	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	//构造方法
	public PopupAuthenticator() {

	}

	public PopupAuthenticator(String uname, String password) {
		this.uname = uname;
		this.password = password;
	}

	public PasswordAuthentication getPasswordAuthentication() {
		String username = uname; //邮箱登录帐号
		String pwd = password; //登录密码
		return new PasswordAuthentication(username, pwd);
	}
}
